import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/subject',
  component: Layout,
  redirect: '/subject/index',
  name: 'subject',
  meta: {
    title: '专题管理',
    icon: 'mingcute:ad-rectangle-line',
  },
  children: [
    {
      path: 'index',
      name: 'subjectIndex',
      component: () => import('@/views/subject/index.vue'),
      meta: {
        title: '专题管理',
        menu: false,
        breadcrumb: false,
        activeMenu: '/subject',
      },
    },
    {
      path: 'detail',
      name: 'subjectDetail',
      component: () => import('@/views/subject/detail.vue'),
      meta: {
        title: '专题配置',
        auth: ['permission.browse'],
        menu: false,
        activeMenu: '/subject',
      },
    },
    {
      path: 'project',
      name: 'subjectProject',
      component: () => import('@/views/subject/project.vue'),
      meta: {
        title: '专题配置',
        auth: ['permission.browse'],
        menu: false,
        activeMenu: '/subject',
      },
    },
  ],
}

export default routes
